c6012e98be85b8e11c75ea0dd26ba90b6f05090d,platform/analysis-impl/src/com/intellij/codeInsight/daemon/RainbowVisitor.java,RainbowVisitor,getInfo,#PsiElement#PsiElement#String#TextAttributesKey#,78

Before Change


    synchronized (context) {
      HashMap<String, Integer> id2index = USED_COLORS.getValue(context);
      Integer colorIndex = id2index.get(id);
      if (colorIndex == null) {
        colorIndex = Math.abs(StringHash.murmur(id, 0x55AA));

        Map<Integer, Integer> index2usage = new HashMap<Integer, Integer>();
        id2index.values().forEach(i -> {
          Integer useCount = index2usage.get(i);
          index2usage.put(i, useCount == null ? 1 : ++useCount);
        });

        int colorsCount = getHighlighter().getColorsCount();
        out:
        for (int cutoff = 0; ; ++cutoff) {
          for (int i = 0; i < colorsCount; ++i) {

After Change


                                  @NotNull final PsiElement rainbowElement,
                                  @NotNull final String name,
                                  @Nullable final TextAttributesKey colorKey) {
    int colorIndex = UsedColors.getOrAddColorIndex((UserDataHolderEx)context, name, getHighlighter());
    return getHighlighter().getInfo(colorIndex, rainbowElement, colorKey);
  }
}